var uguke = new Object();
uguke.submitComment = function(){
	var flags = true;
	if($("#author").val()==''){
		$("#authorlabel").css("color","red");
		flags = false;
	} else {
		$("#authorlabel").css("color","");
	}
	if($("#email").val()==''){
		$("#emaillabel").css("color","red");
		flags = false;
	} else {
		$("#emaillabel").css("color","");
	}
	if($("#commentcontent").val()==''){
		$("#commentcontent").css("border","red solid 1px");
		flags = false;
	} else {
		$("#commentcontent").css("border","");
	}
	if (!flags){
		return ;
	}
	$.post("insertComment",{"author":$("#author").val(),"email":$("#email").val(),
			"url":$("#url").val(),"content":$("#commentcontent").val(),"art_id":$("#comment_art_id").val()},
		function(data,status){
			if(data=="insertSuccess" && status=="success"){
				alert("评论发表成功");
				$("#commentform").get(0).reset();
			}
	});
}